//
//  ColumAndKolTableVIewCell.m
//  Mango
//
//  Created by lanou3g on 16/5/12.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import "ColumAndKolTableVIewCell.h"

@interface ColumAndKolTableVIewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *coverImageView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

@end


@implementation ColumAndKolTableVIewCell

- (void)setModel:(ColumAndKolModel *)model {
    if (_model != model) {
        _model = model;
        NSString *picStr = [model.pic componentsSeparatedByString:@"!"][0];
        [self.coverImageView sd_setImageWithURL:[NSURL URLWithString:picStr] placeholderImage:[UIImage imageNamed:@"placeholder"]];
        self.titleLabel.text = model.title;
    }
}


- (void)awakeFromNib {
    self.coverImageView.layer.cornerRadius = 31.5;
    self.coverImageView.layer.masksToBounds = YES;
}


#pragma mark 切换至日间模式
-(void)updateToDaySkinMode {
    self.titleLabel.textColor = [UIColor blackColor];
    self.contentView.backgroundColor = [UIColor whiteColor];
}
#pragma mark 切换至夜间模式
-(void)updateToNightSkinMode {
    self.titleLabel.textColor = [UIColor grayColor];
    self.contentView.backgroundColor = [UIColor colorWithRed:42/255.0 green:39/255.0 blue:43/255.0 alpha:1.0];
}



- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
